home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 52
/
Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso
/
Aminet
/
dev
/
lang
/
amigatalk.lha
/
intuition
/
BoopsiButtonTags.st
< prev
next >
Wrap
Text File
|
2002-05-05
|
5KB
|
149 lines
" -------------------------------------------------------------------- "
" BoopsiButtonTags Class is a Singleton class that allows the user to "
" reference BOOPSI Button class tags' hexadecimal values. "
""
" EXAMPLE: 'myTag <- buttonTags getTag: #BUTTON_BevelStyle' "
""
" ALL singleton classes MUST contain the following: "
""
" the methods: isSingleton AND privateSetup AND "
" uniqueInstance Class instance variable. "
" -------------------------------------------------------------------- "
Class BoopsiButtonTags :Dictionary ! uniqueInstance !
[
isSingleton
^ true
|
privateNew ! newinstance !
newinstance <- super new.
^ newinstance
|
new
^ self privateSetup
|
getTag: tagKey
^ self at: tagKey
|
privateInitializeDictionary
" (BOOL) Indicate whether button stays depressed when clicked "
self at: #BUTTON_PushButton put: 16r84000001.
" (struct Image *) Indicate that image is to be drawn using
* BltTemplate. Note this tag is only partial support, only single
* plane glyphs are rendered correctly.
"
self at: #BUTTON_Glyph put: 16r84000002.
" (LONG) Pen to use for text (-1 uses TEXTPEN) "
self at: #BUTTON_TextPen put: 16r84000005.
" (LONG) Pen to use for fill (-1 uses FILLPEN) "
self at: #BUTTON_FillPen put: 16r84000006.
" (LONG) Pen to use for fill (-1 uses FILLTEXTPEN) "
self at: #BUTTON_FillTextPen put: 16r84000007.
" (LONG) Pen to use for fill (-1 uses BACKGROUNDPEN) "
self at: #BUTTON_BackgroundPen put: 16r84000008.
self at: #BUTTON_RenderImage put: 16r8003000A. " GA_Image "
self at: #BUTTON_SelectImage put: 16r8003000C. " GA_SelectRender "
" Bevel Box Style "
self at: #BUTTON_BevelStyle put: 16r8400000D.
" Button is transparent, EraseRect fill pattern used
* (if any) to render button background.
"
self at: #BUTTON_Transparent put: 16r8400000F.
" LEFT/RIGHT/CENTER jutification of GA_Text text "
self at: #BUTTON_Justification put: 16r84000010.
" Sets Font SoftStyle, ie, Bold, Italics, etc "
self at: #BUTTON_SoftStyle put: 16r84000011.
" Automatically creates a button with standard scaled glyphs "
self at: #BUTTON_AutoButton put: 16r84000012.
" Argument array for GA_Text varargs string "
self at: #BUTTON_VarArgs put: 16r84000013.
" (STRPTR) default string used for domain calculation "
self at: #BUTTON_DomainString put: 16r84000014.
" (int) integer value to display a numeric string.
* Useful with notifications from sliders, scrollers, etc
"
self at: #BUTTON_Integer put: 16r84000015.
" (struct BitMap *) BitMap to render in button, rather than an image... "
self at: #BUTTON_BitMap put: 16r84000016.
" (BOOL) Is button animatable? Use to turn animating on or off "
self at: #BUTTON_AnimButton put: 16r84000032.
" (struct Image *) Sets an array of struct Images for animation "
self at: #BUTTON_AnimImages put: 16r84000033.
" (struct Image *) sets an array of alternate images for a selected
* state if used, must contain an equal number of images as the
* array used for BUTTON_AnimImages. It's wise to use the
* same-sized images too
"
self at: #BUTTON_SelAnimImages put: 16r84000034.
" (LONG) Number of images available in the arrays "
self at: #BUTTON_MaxAnimImages put: 16r84000035.
" (LONG) Current image number in the array(s) to use
* the range of available frames is 0..MaxAnimImages-1
"
self at: #BUTTON_AnimImageNumber put: 16r84000036.
" (ULONG) Value to be added to the current image number
* counter. The counter will wrap around at MaxAnimImages
"
self at: #BUTTON_AddAnimImageNumber put: 16r84000037.
" (ULONG) Value to be subtracted from the current image
* number counter. The counter will wrap around when < 0
"
self at: #BUTTON_SubAnimImageNumber put: 16r84000038.
" Justification modes for BUTTON_Justification tag: "
self at: #BCJ_LEFT put: 0.
self at: #BCJ_CENTER put: 1. " default - center text "
self at: #BCJ_RIGHT put: 2.
self at: #BCJ_CENTRE put: 1.
" Built-in button glyphs for BUTTON_AutoButton. "
self at: #BAG_POPFILE put: 1. " popup file req "
self at: #BAG_POPDRAWER put: 2. " popup drawer req "
self at: #BAG_POPFONT put: 3. " popup font req "
self at: #BAG_CHECKBOX put: 4. " check glyph button "
self at: #BAG_CANCELBOX put: 5. " cancel glyph button "
self at: #BAG_UPARROW put: 6. " up arrow "
self at: #BAG_DNARROW put: 7. " down arrow "
self at: #BAG_RTARROW put: 8. " right arrow "
self at: #BAG_LFARROW put: 9. " left arrow "
self at: #BAG_POPTIME put: 10. " popup time glyph "
self at: #BAG_POPSCREEN put: 11. " popup screen mode glyph "
self at: #BAG_POPUP put: 12. " generic popup "
|
privateSetup
(uniqueInstance isNil)
ifTrue: [uniqueInstance <- self privateNew.
self privateInitializeDictionary.
].
^ self "or ^ uniqueInstance??"
]